package com.hangwei.paperless.view.window.acceptsee;

import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;

import com.hangwei.paperless.MainSeeActivity;
import com.hangwei.paperless.R;
import com.hangwei.paperless.adapter.accept.Item2Adapter;
import com.hangwei.paperless.model.bean.AcceptCheckInfo;
import com.hangwei.paperless.model.bean.ResultBean;
import com.hangwei.paperless.view.BaseView;
import com.hangwei.paperless.widget.MaxRecyclerView;

import java.util.List;

/**
 * Created by 张龙臣 on 2020/11/24.
 */

public class AcceptItem2See extends BaseView<MainSeeActivity, List<AcceptCheckInfo.TBean>> {

    private MaxRecyclerView mRecyclerView;
    private Item2Adapter mAdapter;
    private List<ResultBean> mResultBeans;

    public AcceptItem2See(MainSeeActivity activity) {
        super(activity);
    }

    @Override
    protected View initView() {
        View inflate2 = LayoutInflater.from(mActivity).inflate(R.layout.page_accept_check_view2, null);
        TextView tvMsg2 = inflate2.findViewById(R.id.tvMsg);
        tvMsg2.setText("3、产品检查 Production Inspection（列出所发现的损伤List Damages）");
        TextView tvAdd = inflate2.findViewById(R.id.tvAdd);
        mRecyclerView = inflate2.findViewById(R.id.recyclerView);

        TextView tvSave = inflate2.findViewById(R.id.tvSave);
        tvSave.setVisibility(View.GONE);
        tvAdd.setOnClickListener(this);
        return inflate2;
    }

    @Override
    public void bindData(List<AcceptCheckInfo.TBean> list) {
        mRecyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
        mAdapter = new Item2Adapter(list);
        mAdapter.setEnable(false);
        mRecyclerView.setAdapter(mAdapter);
    }
}
